<!-- 人员档案-人员详情(刑事犯罪记录)-->
<template>
  <view class="cont  u-p-b-50">
    <u-card :border="false" box-shadow="0px 0px 8px #ddd6d6" :body-style="{ padding: '0 20rpx' }"
      :head-style="{ padding: '28rpx 30rpx 10rpx' }" :head-border-bottom="false">
      <view slot="head">
        <view class="card-row u-flex head">
          <u-section title="犯罪记录" color="#014833" font-size="32" :right="false"></u-section>
        </view>
      </view>
      <template v-if="dataMsg.length">
        <view slot="body">
          <view class="card-row u-p-10 u-card u-card--border u-m-b-10" v-for="obj in dataMsg" :key="obj.id">
            <scroll-view :scroll-x="true" class="u-flex of-hide">
              <view class="container-body u-flex">
                <view class="body-card">
                  <view class="u-p-b-20 f-bold" >{{ obj.caseName }}</view>
                  <view class="u-flex u-m-b-20" v-for="(item, index) in list" :key="index">
                    <view class="u-p-r-20 tit">{{ item.name }}</view>
                    <view class="txt">{{ obj[item.msg] }}</view>
                  </view>
                </view>
              </view>
            </scroll-view>
          </view>
        </view>
      </template>

      <template v-if="dataMsg.length==0">
        <view slot="body" class="c-empty">
          <view class="p-absolute-center"><u-empty text="抱歉，暂无相关数据~"
            :src="require('@/static/image/empty.png')"></u-empty></view>
        </view>
      </template>
    </u-card>
  </view>
</template>
<script>
export default {
  props: {
    dataMsg: Array,
    default: []
  },
  data () {
    return {
      list: [
        {
          name: '立案日期:',
          msg: 'recordDate'
        },
        {
          name: '刑满释放日期:',
          msg: 'releaseDate'
        },
        {
          name: '判决结果:',
          msg: 'sentenceResult'
        },
      ],

    };
  },
  mounted () {
    
  },
  methods: {

  }
}
</script>
<style lang="scss" scoped>
.cont{
		height: 100%;
		overflow: auto;
	}
.head {
  padding-bottom: 24rpx;
  border-bottom: 2rpx solid #F6F6F6;
}

.body-card {
  .txt {
    color: #666;
  }

  .tit {
    color: #333;
  }

}
.c-empty{
  height: 520rpx;
}
</style>